Skip to content

Improve local HexStrike setup, performance, and add Docker support#133

Open
m2l33k wants to merge 2 commits into0x4m4:masterfrom
m2l33k:master
Open

Improve local HexStrike setup, performance, and add Docker support#133
m2l33k wants to merge 2 commits into0x4m4:masterfrom
m2l33k:master

Conversation

@m2l33k
Copy link

@m2l33k m2l33k commented Jan 16, 2026

Summary

This PR improves the local development/runtime experience for HexStrike, optimizes part of the intelligent smart scan path, and adds Docker support for running the stack in a containerized Kali-based environment.

Changes

Configuration

  • hexstrike-ai-mcp.json
    • Point MCP command to the local Python interpreter (python on Windows).
    • Use the actual local path to hexstrike_mcp.py on the Windows machine.
    • Set the MCP server URL to http://127.0.0.1:8888 to match the default HexStrike server.
    • Increase the MCP timeout from 300s to 600s to better handle long-running scans.

Server performance

  • hexstrike_server.py
    • Optimize vulnerability detection in the intelligent smart scan:
      • Convert tool output to lowercase once and reuse it for all indicator checks instead of repeatedly calling output.lower().
    • Optimize combined output aggregation:
      • Accumulate per-tool output segments in a list and join them once at the end, instead of repeated string concatenation.
    • These changes reduce unnecessary CPU and memory overhead when multiple tools are executed in parallel and produce large outputs.

Ignore rules

  • .gitignore
    • Add a Python-focused .gitignore for this repo:
      • Ignore bytecode and __pycache__ directories.
      • Ignore common virtualenv folders (venv/, env/, hexstrike-env/, .venv/, etc.).
      • Ignore IDE/editor files (.vscode/, .idea/, swap files).
      • Ignore OS-specific junk (.DS_Store, Thumbs.db, desktop.ini).
      • Ignore logs, temporary files, build artifacts, and common tool caches (.pytest_cache/, .mypy_cache/, .coverage, etc.).
      • Ignore generic security-tool output directories (output/, results/, reports/).

Docker support

  • Dockerfile
    • Add a Dockerfile based on Kali Linux to provide a containerized environment tailored for penetration testing and security tooling.
    • Intended to make it easier to run HexStrike with the required toolset in a consistent, reproducible environment.

Testing

  • Ran Python bytecode compilation to ensure files are syntactically valid:
    • python -m py_compile hexstrike_server.py hexstrike_mcp.py
  • No syntax errors reported.
  • MCP and server configuration changes are aligned with the documented default host/port (127.0.0.1:8888).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant